package jml.config;

import jml.config.cmd.CommandGroup;


public class Config
{
	private static Config config = null;
	
	private Filters filters;
	private Thumbnails thumbnails;
	private Descriptor descriptor;
	private LabelGroups labelGroups;
	private Library library;
	private ReservedAtts reservedAtts;
	private Tooltip tooltip;
	private FileTypes fileTypes;
	private Plugins plugins;

	private CommandGroup commandGroup;
	
	public Plugins getPlugins()
	{
		return plugins;
	}
	
	public FileTypes getFileTypes()
	{
		return fileTypes;
	}
	
	public Filters getFilters()
	{
		return filters;
	}

	public Descriptor getDescriptor()
	{
		return descriptor;
	}

	public LabelGroups getLabelGroups()
	{
		return labelGroups;
	}

	public Library getLibrary()
	{
		return library;
	}

	public ReservedAtts getReservedAtts()
	{
		return reservedAtts;
	}

	public Tooltip getTooltip()
	{
		return tooltip;
	}

	public Thumbnails getThumbnails()
	{
		return thumbnails;
	}
	
	public static Config getConfig(boolean reload)
	{
		if( config==null || reload )
		{
			config = new Config();
			config.filters = UConfig.getFilters();
			config.thumbnails= UConfig.getThumbnails();
			config.descriptor = UConfig.getDescriptor();
			config.labelGroups = UConfig.getLabelGroups();
			config.library = UConfig.getLibrary();
			config.reservedAtts = UConfig.getReservedAtts();
			config.tooltip = UConfig.getTooltip();
			config.fileTypes = UConfig.getFileTypes();
			config.plugins = UConfig.getPlugins();
			config.commandGroup=UConfig.getCommandGroup();
		}
		
		return config;
	}

	public CommandGroup getCommandGroup()
	{
		return commandGroup;
	}

	public void setCommandGroup(CommandGroup commandGroup)
	{
		this.commandGroup = commandGroup;
	}
}
